A user can use fingerprints to lock or unlock an electronic device (for example, a mobile phone). However, if the user lends the electronic device to another user, the user may need to clear personal information (for example, account names and passwords) for different applications after unlocking the electronic device. It is inconvenient for the user to clear the personal information for each application one by one manually.